import {markRaw} from "vue"
import SelectDepartment from "./formSchemaComponents/select-department.vue"
import SelectTemplate from "./formSchemaComponents/select-template.vue"

export const addSchema: FormSchema = {
    "style": {
        "width": "auto"
    },
    "formItemLayout": {
        "labelCol": {
            "span": 6
        },
        "wrapperCol": {
            "span": 18
        }
    },
    "formItem": [
        {
            "type": "input",
            "label": "终端序列码",
            "key": "clienthash",
            "value": "",
            "props": {
                "placeholder": "终端序列码"
            },
            "rules": [
                {
                    "required": true,
                    "message": "终端序列码不能为空"
                }
            ]
        },
        // {
        //     "type": "input",
        //     "label": "最后登录IP",
        //     "key": "lastip",
        //     "value": "",
        //     "props": {
        //         "placeholder": "终端IP"
        //     }
        // },
        {
            "type": "input",
            "label": "终端别名",
            "key": "clientname",
            "value": "",
            "props": {
                "placeholder": "终端别名"
            }
        },
        // {
        //     "type": "input",
        //     "label": "终端版本",
        //     "key": "clientversion",
        //     "value": "",
        //     "props": {
        //         "placeholder": "终端版本"
        //     }
        // },
        {
            "type": "component",
            "label": "选择部门",
            "key": "department",
            "value": undefined,
            "component": markRaw(SelectDepartment),
            "props": {
                "placeholder": "请选择部门"
            },
            "rules": [
                {
                    "required": true,
                    "message": "请选择部门"
                }
            ]
        },
        {
            "type": "component",
            "label": "选择模板",
            "key": "tempid",
            "value": undefined,
            "component": markRaw(SelectTemplate),
            "props": {
                "placeholder": "请选择模板"
            },
            "rules": [
                {
                    "required": true,
                    "message": "请选择模板"
                }
            ]
        }
    ]
}
